<template>
	<view>
		<view class="status_bar"></view>
		<!-- 顶部导航栏 -->
		<view class="topBar themeBac f-c-c">
			<image @click="$back(1)" src="../../static/login/icon_back.png" mode="widthFix"></image>
			<u-search @custom="search" @search="search" height="55" :placeholder="placeholder" :action-style="searchStyle"></u-search>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchStyle: {
					color: "#ffffff"
				},
				placeholder:"请搜索关键词"
			}
		},
		methods: {
			search(value){
				if(value.trim()===""){
					this.$u.toast("请输入关键词!")
					return;
				}
				this.$to(`../search-toPage/search-toPage?value=${value}`)
			}
		}
	}
</script>

<style>
	.topBar {
		height: 100rpx;
		padding: 0 30rpx;
	}

	.topBar image {
		width: 20rpx;
		margin-right: 20rpx;
	}
</style>
